package com.s08.h01.utils;

import com.s08.h01.model.PremiumUser;
import com.s08.h01.model.User;

public class UserUtils {

	public static void listUsers(User[] users){
		for (User user : users) {
			System.out.println(user);
			System.out.println((user).showProducts());
			
			if (user instanceof PremiumUser){
				System.out.println(((PremiumUser) user).showDiscountInfo());
				System.out.println(((PremiumUser) user).showDiscountProducts());
			}
		}
	}
}		